﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.ComponentModel.DataAnnotations;
using BCCommon.Enums;
using BCDto.Utils;

namespace BCDto.MakeStaticPagingComponent.WebsiteTemplateAttachment
{
    /// <summary>
    /// 网站模板附件
    /// </summary>
    public class WebsiteTemplateAttachmentRequestDto
    {
        /// <summary>
        /// 网站模板Id
        /// </summary>		
        [Display(Name = "网站模板Id")]
        [Required(ErrorMessage = "{0} 不应为空")]
        public int WebsiteTemplateId { get; set; }
        /// <summary>
        /// 文件类型
        /// </summary>		
        [Display(Name = "文件类型")]
        [Required(ErrorMessage = "{0} 不应为空")]
        public StaticPageFileType FileType { get; set; }
        /// <summary>
        /// 插入位置
        /// </summary>		
        [Display(Name = "插入位置")]
        [Required(ErrorMessage = "{0} 不应为空")]
        public StaticPageInsertLocationType InsertLocation { get; set; }
        /// <summary>
        /// 文件地址
        /// </summary>		
        [Display(Name = "文件地址")]
        [Required(ErrorMessage = "{0} 不应为空")]
        [MaxLength(1000, ErrorMessage = "{0} 长度应小于{1}")]
        [FileType(fileSuffixes:new string[] { "js","css","jpg", "jpeg", "gif", "bmp", "png", "doc", "docx", "xls", "xlsx", "csv", "ppt", "pptx", "pub", "mp4", "mp3", "amr", "wav", "wma", "ttf", "eot", "svg", "woff" },ErrorMessage ="{0} 类型不是有效类型")]
        public string FileAddress { get; set; }
    }
}

